package com.eight.cloud.job.config;

import com.eight.cloud.job.service.IExecutionJobService;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 初始化定时任务
 * @ClassName: ExecutionJobInitializer
 * @Author: TXC
 * @Date: 2025-07-15 17:04
 **/
@Order(2)
@Component
public class ExecutionJobInitializer implements ApplicationRunner {

    @Resource
    private IExecutionJobService executionJobService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        executionJobService.initExecutionJob();
    }
}
